<?php
/**
 * Rph_model Class
 *
 */
class Distribusi_model extends CI_Model {
	/**
	 * Constructor
	 */
	function Distribusi_model()
		{
			parent::__construct();
		}
	
	function get_all_titik_pasok(){
		return $this->db->select('*')
				->from('titik_pasok')
				->join('kota', 'kota.ID_KOTA = titik_pasok.ID_KOTA')
				->get();
	}
	
	function insert_to_distribusi($arr){
		$this->db->insert('distribusi_stok', $arr);
		
		return $this->db->insert_id();
	}
	
	function insert_to_perubahan_status($arr){
		$this->db->insert('perubahan_status', $arr);
	}
	
	function insert_to_stok($arr){
		$this->db->insert('stok', $arr);
	}
	
}
// END Rph_model Class

/* End of file Rph_model.php */ 
/* Location: ./system/application/model/rph_model.php */